package com.niit.session23.io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileOutputDemo {
	public static void main(String[] args) {
		FileOutputStream outputStream =  null;
		try {
			outputStream = new FileOutputStream("G:\\Java\\input\\outputTest.txt");
			String str = "I am fine ,Thank you!";
			outputStream.write(str.getBytes());
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}finally {
			try {
				outputStream.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

}
